package com.project.bean;

import java.time.LocalDate;

/**
 * 商品实体bean
 */
public class ProductBean {
    //编号
    private int id;
    //名字
    private String name ;
    //厂家
    private String factory;
    //价格
    private int price;
    //生产日期
    private LocalDate productTime;

    public ProductBean(String name, String factory, int price, CharSequence productTime) {
        this.name = name;
        this.factory = factory;
        this.price = price;
        this.productTime = LocalDate.parse(productTime);
    }

    public ProductBean() {
    }

    @Override
    public String toString() {
        return "ProductBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", factory='" + factory + '\'' +
                ", price=" + price +
                ", productTime=" + productTime +
                "\n";
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getFactory() {
        return factory;
    }

    public void setFactory(String factory) {
        this.factory = factory;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public LocalDate getProductTime() {
        return productTime;
    }

    public void setProductTime(LocalDate productTime) {
        this.productTime = productTime;
    }
}
